home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 45 (1996-03)(MegaDisc Digital Publishing)(AU)(Disk 1 of 2)[WB].zip / MegaDisc 45 (1996-03)(MegaDisc Digital Publishing)(AU)(Disk 1 of 2)[WB].adf / Programs / FLP_by_ANP / Beep.doc / Beep.doc
Text File  |  1996-01-21  |  3KB  |  68 lines

  1.  
  2. *****************************************************************************
  3. * Project Details                                                           *
  4. * ---------------                                                           *
  5. * Project Name:    Beep                                                     *
  6. * Project Version: 1                                                        *
  7. * Copyright:       Anthony N Peck                                           *
  8. * Date:            Thursday 1st June 1995                                   *
  9. *                                                                           *
  10. * Contact:                                                                  *
  11. * 68 Woralul St                                                             *
  12. * Waramanga ACT 2611                                                        *
  13. * AUSTRALIA                                                                 *
  14. *                                                                           *
  15. *****************************************************************************
  16. * Summary                                                                   *
  17. * -------                                                                   *
  18. *                                                                           *
  19. * Usage: Beep                                                               *
  20. *                                                                           *
  21. * This is a nonsensical little program that "beeps" and flashes the screen. *
  22. * Feel free to put it at the bottom of your cupboard and forget about it!   *
  23. *                                                                           *
  24. *****************************************************************************
  25.  
  26. ; Some quick equivalents...
  27.  
  28. ExecBase                = $04       ; Exec Base...ahem
  29. _LVOOpenlibrary         = -$0228    ; Exec function opens libraries
  30. _LVOCloselibrary        = -$019E    ; Exec function closes libraries
  31. _LVODisplayBeep         = -$60      ; Intuition function
  32.  
  33. ; An Exec Macro...
  34.  
  35. EXEC            Macro
  36.         MOVE.L  ExecBase,A6         ; Move Exec into a6
  37.         JSR     _LVO\1(A6)          ; Add Library offset and call function
  38.                 Endm
  39.  
  40. ; Program starts here
  41.  
  42. Openint:
  43.  
  44.         LEA     Intname,A1          ; Load the Intuition library
  45.         MOVE.L  #$00,D0             ; Any version will do
  46.         EXEC    Openlibrary         ; Macro opens library
  47.         BEQ     Exit                ; If there's a problem, close down
  48.         MOVE.L  D0,A6               ; Save the return address in A6
  49.  
  50. Beep:
  51.  
  52.         MOVE.L  #$00,A0             ; All screens to "Beep"
  53.         JSR     _LVODisplayBeep(A6) ; Go do it!
  54.  
  55. Close:        
  56.  
  57.         MOVE.L  A6,A1
  58.         EXEC    Closelibrary       ; Macro closes Intuition
  59.  
  60. Exit:
  61.  
  62.         CLR.L   D0                  ; Clear D0
  63.         RTS                         ; Return To System
  64.  
  65. Intname:
  66.  
  67.         DC.B    "intuition.library",$00  ; Intuition library name
  68.